#define _CRT_SECURE_NO_WARNINGS 1
#include"sort.h"

void TestInsertSort(int* a, int n)
{
	PrintArray(a, n);
	InsertSort(a, n);
	PrintArray(a, n);
}

void TestShellSort(int* a, int n)
{
	PrintArray(a, n);
	ShellSort(a, n);
	PrintArray(a, n);
}

void TestSelectSort(int* a, int n)
{
	PrintArray(a, n);
	SelectSort(a, n);
	PrintArray(a, n);
}

void TestHeapSort(int* a, int n)
{
	PrintArray(a, n);
	HeapSort(a, n);
	PrintArray(a, n);
}

void TestBubbleSort(int* a, int n)
{
	PrintArray(a, n);
	BubbleSort(a, n);
	PrintArray(a, n);
}

void TestQuickSort(int* a, int left,int right)
{
	PrintArray(a, right+1);
	QuickSort(a, left,right);
	PrintArray(a, right+1);
}


int main()
{
	int a[] = { 6,8,9,6,3,5,8,6,7,1,2,4 };
	//TestInsertSort(a,sizeof(a)/sizeof(a[0]));
	//TestShellSort(a, sizeof(a) / sizeof(a[0]));
	//TestSelectSort(a, sizeof(a) / sizeof(a[0]));
	//TestHeapSort(a, sizeof(a) / sizeof(a[0]));
	//TestBubbleSort(a, sizeof(a) / sizeof(a[0]));
	//TestQuickSort(a, 0,sizeof(a) / sizeof(a[0])-1);
	TestOP();

}